package com.ebocy.hammer.battle.fight.message;

import java.util.ArrayList;
import java.util.List;

import com.ebocy.hammer.core.constants.GameMessageCode;
import com.ebocy.hammer.core.message.AbstractC2SMessage;

public class S2CAttackPositionMessage extends AbstractC2SMessage {
	public List<AttackPostion> attackPositionList = new ArrayList<AttackPostion>();
	@Override
	public short getMessageCode() {
		return GameMessageCode.BATTLE_ATTACK_POSITION;
	}

	@Override
	public void readMessage() {
		short attackPositionSize = readShort();
		AttackPostion attackPosition = null;
		for (int i = 0; i < attackPositionSize; i += 2) {
			attackPosition = new AttackPostion();
			attackPosition.x = readShort();
			attackPosition.y = readShort();
			this.attackPositionList.add(attackPosition);
		}

	}

}
